{include file="public/header" /}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .btn-active {
        background: #1ab394;
        color: #fff
    }


    .feed-element .content {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .chart-card .metawrap .total {
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-all;
        white-space: nowrap;
        color: rgba(0, 0, 0, .85);
        margin-top: 4px;
        margin-bottom: 0;
        font-size: 20px;
        line-height: 38px;
        height: 38px;
    }

    .chart-card {
        padding: 20px 24px 8px;
    }

    .chart-card .chart-footer {
        padding-top: 9px;
        margin-top: 8px;
        border-top: 1px solid #e8e8e8;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <a class="btn btn-default btn-outline {if input('get.sex/s','-1') eq '-1'} btn-active{/if}"
                           href="{:url('Statistics/reportForm')}">所有数据</a>
                        <!--<a class="btn btn-default btn-outline {if input('get.type/s') eq '0'} btn-active{/if}"-->
                           <!--href="{:url('Statistics/reportForm', ['sex'=>0])}">今日数据</a>-->
                        {foreach $sexs as $sex=>$sex_name}
                        <a class="btn btn-default btn-outline {if input('get.sex/s') eq $sex} btn-active{/if}"
                           href="{:url('Statistics/reportForm', ['sex'=>$sex])}">{$sex_name}性</a>
                        {/foreach}
                    </div>
                </div>
                <div style="display:block;clear: both;"></div>
                <div class="fixed-table-toolbar">
                    <form method="get">
                        <input type="hidden" name="sex" value="{:input('get.sex/d','-1')}"/>
                        <div class="pull-left search">

                            <div class="pull-right search">
                                <button style="border-radius:0px; border:1px solid #e5e6e7; border-left:0px"
                                        class="btn btn-default btn-outline" type="submit">搜索
                                </button>

                            </div>

                            <div class="columns columns-right btn-group pull-right">
                                <input type="text" name="date_range" id="date_range" class="form-control" placeholder="时间" readonly="readonly"
                                       value="{if !empty($name.begin_date)}{$name.begin_date}{/if}{if !empty($name.end_date)} - {$name.end_date}{/if}" />
                            </div>

                        </div>
                    </form>
                </div>

            </div>



        </div>

        <p></p>
        <hr>
        <div class="layui-row layui-col-space20">
            {foreach $data_list as $data}
            <div class="layui-col-sm6 layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-body chart-card">
                        <div class="chart-header">
                            <div class="metawrap">

                                <div class="total">{$data['count']}</div>
                            </div>
                        </div>

                        <div class="chart-footer">
                            <div class="field">
                                <span>{$data['title']}</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {/foreach}
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.css"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.js"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"}
<script type="text/javascript">

    //年月范围
    layui.use('laydate',function () {
        layui.laydate.render({
            elem: '#date_range',
            type: 'date',
            range: true
        });
    });
</script>